//#include<iostream>
//#include <vector>
//
//using namespace std;
////int minSubArrayLen(int target, vector<int>& nums) {
////    int i = 0;
////    int j = 0;
////    int res = INT_MAX;
////    while (j < nums.size()) {
////        int sums = 0, s = i;
////        while (s <= j) {
////            sums += nums[s++];
////        }
////        if (sums >= target) {
////            i += 1;
////            res = min(res, j - i);
////        }
////        else {
////            j += 1;
////        }
////        
////    }
////    return res;
////}
//int minSubArrayLen(int target, vector<int>& nums) {
//    int sum_nums = accumulate(nums.begin(), nums.end(), 0);
//    if (sum_nums < target) return 0;
//    int ans = nums.size();
//    int left = 0;
//    int sum = 0;
//    for (int right = 0; right < nums.size(); right++) {
//        sum += nums[right];
//        while (sum >= target) {
//            ans = min(ans, right - left + 1);
//            sum -= nums[left++];
//        }
//    }
//    return ans;
//}
//
//int main() {
//  
//    vector<int> a = { 2, 3,1, 2, 4, 3 };
//    cout << minSubArrayLen(7,a) << endl;
//	return 0;
//}